var express=require("express");
var path=require("path");
var url=require("url");

var app=express.createServer();
app.use(express.static("stat"));
app.use(express.bodyParser());
app.set('views',  __dirname +'/views');
app.set("view engine","jade");

function User(name, email) {
  this.name = name;
  this.email = email;
}

function Bookmark(url,title){
	this.url=url;
	this.title=title;
}
// Dummy users
var users = [
    new User('tj', 'tj@vision-media.ca')
  , new User('ciaran', 'ciaranj@gmail.com')
  , new User('aaron', 'aaron.heckmann+github@gmail.com')
];

var bookmarks=[
	new Bookmark('google.com','google'),
	new Bookmark('facebook.com','facebook'),
	new Bookmark('twitter.com','twitter')
];

app.get("/",function(req,res){
   	//res.render('users', { users: users});
    res.render('bookmarks',{bookmarks:bookmarks});
});


app.listen(8080,"127.0.0.1");
console.log("127.0.0.1");